package santeclair.connexion.bean;

import java.util.HashMap;
import java.util.Map;

import santeclair.connexion.bean.trame.aller.identification.DemandeIdentification;
import santeclair.connexion.bean.trame.retour.identification.ResultatIdentification;

public class RetourIdentificationTransport<DEMANDE_IDENTIFICATION extends DemandeIdentification, RESULTAT_IDENTIFICATION extends ResultatIdentification> {

    private boolean identificationSuccessful = false;
    private DEMANDE_IDENTIFICATION demandeIdentification;
    private RESULTAT_IDENTIFICATION resultatIdentification;
    private Map<ParametreRetourIdentificationEnum, String> parametresIdentification = new HashMap<RetourIdentificationTransport.ParametreRetourIdentificationEnum, String>();

    public RetourIdentificationTransport() {
    }

    public RetourIdentificationTransport(DEMANDE_IDENTIFICATION demandeIdentification) {
        this.demandeIdentification = demandeIdentification;
        this.parametresIdentification.put(ParametreRetourIdentificationEnum.NUM_CONTRAT_SAVED, demandeIdentification.getNumeroContrat());
        this.parametresIdentification.put(ParametreRetourIdentificationEnum.NOM_SAVED, demandeIdentification.getNom());
        this.parametresIdentification.put(ParametreRetourIdentificationEnum.PRENOM_SAVED, demandeIdentification.getPrenom());
    }

    public DEMANDE_IDENTIFICATION getDemandeIdentification() {
        return demandeIdentification;
    }

    public void setDemandeIdentification(DEMANDE_IDENTIFICATION demandeIdentification) {
        this.demandeIdentification = demandeIdentification;
    }

    public RESULTAT_IDENTIFICATION getResultatIdentification() {
        return resultatIdentification;
    }

    public void setResultatIdentification(RESULTAT_IDENTIFICATION resultatIdentification) {
        this.resultatIdentification = resultatIdentification;
    }

    public Map<ParametreRetourIdentificationEnum, String> getParametresIdentification() {
        return parametresIdentification;
    }

    public boolean isIdentificationSuccessful() {
        return identificationSuccessful;
    }

    public void setIdentificationSuccessful(boolean identificationSuccessful) {
        this.identificationSuccessful = identificationSuccessful;
    }

    public enum ParametreRetourIdentificationEnum {
        IDENTIFICATION_NOM_PRENOM,
        NUM_CONTRAT_SAVED,
        NOM_SAVED,
        PRENOM_SAVED;
    }
}
